
/******************************************************************************\
|    Title:        	 FIGUREF5: Share of Member Salary That Switchers Move To   |
|    Date:         	 July 2023	                                         	   |
|    Author:         Elisa Wirsching	      							       |
\******************************************************************************/


clear all
set more off, permanently
numlabel, add
set maxvar 32000

use congress_yearly.dta, clear

* where switchers land
twoway kdensity percent_annualpay if posttreat==1 & switchtouncovered_treatment ==1 & nonadmin_everyear==1 || kdensity percent_annualpay if posttreat==1 & switchtouncovered_treatment ==1 & lobbydirectafter==1 & nonadmin_everyear==1, graphregion(color(white)) ytitle("Kernel density") xtitle("Share of member salary (landing)") legend(order(1 "All" 2 "Lobbyists")) name(landing, replace)

* where switchers start
xtset stafferid year
gen temp = L.percent_annualpay

twoway kdensity temp if posttreat==1 & switchtouncovered_treatment ==1 & temp<=1 & nonadmin_everyear==1 || kdensity temp if posttreat==1 & switchtouncovered_treatment ==1 & lobbydirectafter==1 & temp<=1 & nonadmin_everyear==1, graphregion(color(white)) ytitle("Kernel density") xtitle("Share of member salary (starting)") legend(order(1 "All" 2 "Lobbyists")) name(starting, replace)

grc1leg landing starting, graphregion(color(white))

